package com.itheima.service;

import com.itheima.mapper.UserMapper;
import com.itheima.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    //注入usermapper
    @Autowired
    private UserMapper userMapper;


    /**
     * 根据用户id查询用户信息
     *
     * @return 返回user对象
     */
    public User queryUserById(Long userId) {

        return userMapper.queryUserById(userId);
    }
}
